import 'package:flutter/material.dart';
import 'package:get/get.dart';

class TestAPage extends StatefulWidget {
  @override
  _TestAPageState createState() => _TestAPageState();
}

class _TestAPageState extends State<TestAPage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('测试A页面'),
      ),
      body: Container(
        width: double.infinity,
        height: double.infinity,
        child: Column(
          children: [],
        ),
      ),
    );
  }

  buildExit1() {
    return ElevatedButton(
        onPressed: () {
          Navigator.of(context).pop("A页面传回的数据");
        },
        child: Text("普通方式退出页面"));
  }

  buildExit2() {
    return ElevatedButton(
        onPressed: () {
          Get.back(result: "getX关闭的页面");
        },
        child: Text("getX 方式退出页面"));
  }
}
